error handling for loggers