improved command line options
improved error handling