public static void Log(string text) { lock (_lockObject) { if (_inst == null) { _inst = new MainLog(_infoLogFileName); } _inst.Log(text); _inst.Close(); _inst = null; } }