Refactored log statements.