Cannot fetch item in NSFileProvider (macOS)

In fetchContents(..) method, I download file item from server by session.downloadTask. And i copy file from response url to temporary url (which is created from NSFileProviderManager.temporaryURL). After this, it's certain that file contents of temporary url is not 0byte (same length with downloaded file) And then i call completionHandler with this temporary url, file provider item. But i cannot open file in finder with error msg - cannot open because the file is empty.

let task = downloadItem(named: filename) { url, error in
      let dataURL = makeTemporaryURL()

      do {
        try FileManager.default.copyItem(at: url, to: dataURL)
        completionHandler(dataURL, item, nil)
      }
      catch let error as NSError {
        completionHandler(nil, nil, Error.fileDownloadFailed)
      }
    }
    task.progress.cancellationHandler = { completionHandler(nil, nil, NSError(domain: NSCocoaErrorDomain, code: NSUserCancelledError)) }
     
    return task.progress
Cannot fetch item in NSFileProvider (macOS)
 
 
Q