Better logging of exceptions.