Add more logging for exceptions.