Hopefully improved error reporting.