curl reset return false on failure