Curl Error checking