JC-1662 Added additional logging for exceptions.