Improved error reporting for command line