Improved error reporting on crash.
Self-review