Improve logging.
Improve logging and code style.
Merge pull request #4176 from HassenRiahi/ImproveLogging

Improve logging