fixed some bugs in the command line parserand logger