command line parsing and checks