changed error reporting