Logging module more robust