Improve the logging flow and view