adds failure error handling to yaml parsing