added more debugging info to crash messages

fixes #993