Added more information to error reporting.