Extend logging.
Log exceptions also.