private List<FSRL> doAddFiles(List<FSRL> filesToAdd, TaskMonitor monitor) {

		BatchTaskMonitor batchMonitor = new BatchTaskMonitor(monitor);

		// start a new CryptoSession to group all password prompting by multiple container
		// files into a single session, enabling "Cancel All" to really cancel all password
		// prompts
		try (CryptoSession cryptoSession = fsService.newCryptoSession()) {
			List<FSRL> badFiles = new ArrayList<>();
			for (FSRL fsrl : filesToAdd) {
				batchMonitor.setPrefix("Processing " + fsrl.getName() + ": ");

				try {
					monitor.checkCancelled();
					addFile(fsrl, batchMonitor);
				}
				catch (CryptoException ce) {
					FSUtilities.displayException(this, null, "Error Adding File To Batch Import",
						"Error while adding " + fsrl.getName() + " to batch import", ce);
				}
				catch (IOException ioe) {
					Msg.error(this, "Error while adding " + fsrl.getName() + " to batch import",
						ioe);
					badFiles.add(fsrl);
				}
				catch (CancelledException e) {
					Msg.debug(this, "Cancelling Add File task while adding " + fsrl.getName());
					// Note: the workflow for this felt odd: press cancel; confirm cancel; press Ok 
					//       on dialog showing files not processed.
					// It seems like the user should not have to see the second dialog
					// badFiles.addAll(filesToAdd.subList(i, filesToAdd.size()));
				}
			}

			return badFiles;
		}
	}
Adds the given files to this batch import

@param filesToAdd the files to add
@return any files that failed to load; exceptions will be logged
Ghidra/Features/Base/src/main/java/ghidra/plugins/importer/batch/BatchInfo.java