Move log messages into loop.