improved the error messages