Improved the error messages