Refined error reporting