Adding improved error messages