Added better argument parsing to logshandler