     }
     
     public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) {
-        self.finishDownloadHandler?(session, downloadTask, location)
-        
         let dcompletionHandler = downloadCompletionHandlersForTasks[session.sessionDescription!]?[downloadTask.taskIdentifier]
         dcompletionHandler?(location)
         _ = downloadCompletionHandlersForTasks[session.sessionDescription!]?.removeValue(forKey: downloadTask.taskIdentifier)

        default:
            completionHandler(.performDefaultHandling, nil)
        }
    }
    
    @available(iOS 9.0, macOS 10.11, *)
    public func urlSession(_ session: URLSession, streamTask: URLSessionStreamTask, didBecome inputStream: InputStream, outputStream: OutputStream) {
        self.didBecomeStream?(session, streamTask.taskIdentifier, inputStream, outputStream)
    }
}


    
    weak var fileProvider: (FileProviderBasicRemote & FileProviderOperations)?
    var credential: URLCredential?
    
    public init(fileProvider: FileProviderBasicRemote & FileProviderOperations) {
        self.fileProvider = fileProvider
