More substantial error checking for command line arguments