Improve error handling

Print error message and exit when no command line arguments are specified.