@Override
      public void fileDownloaded(@NotNull VirtualFile localFile) {
        try {
          remoteFileInfo.removeDownloadingListener(this);
        }
        finally {
          promise.setResult(localFile);
        }
      }
@Override
      public void fileDownloaded(@NotNull VirtualFile localFile)