added curl_close to destructor