avoid "not a valid cURL handle resource" error