add conditional logig for checking cURL init function