logging refactoring
oops fix