Changed the command line argument parsing and logging logic completely