checks for curl init failure