Improved error reporting.
Improved error reporting.