logging refactoring finished