Improved error reporting. #3