Fix logging refactoring bug