Improved error reporting
Updated version