Better exception logging.