PUT issue

closing the file handle before curl could complete