static int Main(string[] args) { try { return ExecSubCommand(args); } finally { Logger.Flush(); Logger.UnregisterAllListeners(); } }