minor logic refactor on logger class