private static void WriteText(LoggedItem logger, String text) { logger.Write(addTimestamp ? DateTime.Now.ToString(timeFormat) + ' ' + text : text); // Check for errors if (logger.Failed) { Error(logger.LastError); } }