better logging in exceptions.