Improved error reporting (still ugly)