Refactoring: extract logger to separate file