Logging is now more robust