more checks for bad returns from curl