uclient-http: Close ustream file handle only if allocated