Log exceptions that occur after response start

Fix #694
Clean up some inconsistent in error handling