public void TearDown() { EneterTrace.StopProfiler(); EneterTrace.DetailLevel = EneterTrace.EDetailLevel.Short; if (EneterTrace.TraceLog is StreamWriter) { Thread.Sleep(500); TextWriter aTrace = EneterTrace.TraceLog; EneterTrace.TraceLog = null; aTrace.Close(); } }