static void Log(string message, params object[] args) { if (_logFile == null) { OpenLogFile(); } if (_logFile != null) { _logFile.WriteLine(string.Format("[{0}] {1}", DateTime.Now, message), args); _logFile.Flush(); } }