Can you put this logic right after parsing the command line arguments?