Improved error reporting somwhat.