Correct log refactoring