Revised the ugly-as-sin logging system. added additional command line arguments.