static void Main(string[] args) { CommandConsoleSB commandConsole = null; try { commandConsole = new CommandConsoleSB(); commandConsole.ExecutionCommand(); } catch (Exception exception) { Log.Error(exception.ToString); } finally { if (commandConsole != null) { commandConsole.StopConsole(); } else { Environment.Exit(0); } } }