Improved a bit the logging