refactorings, defer logger creation till needed