private static bool LogError(string text) { try { if (!LoggingIsAvailable()) return false; Logging.Error(text); return true; } catch (Exception) { return false; } }