refactor logger module