close temp file on connect_provider