Improve diagnostics on errors / warnings / crashes