Moved error checking for command line options around.