Adjusted exception logging.