changed curl to only run if all resources check out as valid