Catch console exceptions and return proper exit code
Improve exception message