added error handling to _iterateAsync