eanup: write curl_reset in fgets loop