@Override public Transfer run(final Session<?> session) throws BackgroundException { final Path file = editor.getRemote(); if(log.isDebugEnabled()) { log.debug(String.format("Run edit action for editor %s", file)); } // Delete any existing file which might be used by a watch editor already final TransferOptions options = new TransferOptions(); options.quarantine = false; options.open = false; final SingleTransferWorker worker = new SingleTransferWorker(session, session, download, options, new TransferSpeedometer(download), new DisabledTransferPrompt(), callback, listener, new DisabledStreamListener(), new DisabledLoginCallback(), new DisabledPasswordCallback(), notification); worker.run(); if(!download.isComplete()) { log.warn(String.format("File size changed for %s", file)); } try { editor.edit(quit, watcher); } catch(IOException e) { throw new DefaultIOExceptionMappingService().map(e); } return download; }