Improved error reporting a bit.