Moved logger to the top level in preparation for refactoring