Common diagnostics changes including trace flag usage