Refactor log message