refactor for logger module