improving error reporting