Set of fixes to logging.
  - Fix setting debug level in options.
  - General standardization of logging