added some rudimentary command line checking