bug fix
refactor logger