Crash reporting

Doesn't cover everything, but it's better than nothing.