script checks for valid command line input