Added global exception logging.