updated error messages
fixed command line mode