Fixes #210 Changing exception handling and validation of command line arguments