Fix error with logger creation