add better error messages