Error checking of commandline arguments