fixed error message; added error handling sample