log messages on error