Added more error reporting.