better error handling in CommandConsole