added logger class to replace direct calls to stdout/stderr, removed some unecessary translation of log messages, default log level is >=warning which hides most of the current log messages