Moved logging inside run method.