docs: public boolean initOutPathDistFS(Path outPath, WriteMode writeMode, boolean createDirectory) throws IOException {
  		if (!isDistributedFS()) {
  			return false;
  		}
  
  		// NOTE: We actually need to lock here (process wide). Otherwise, multiple threads that
  		// concurrently work in this method (multiple output formats writing locally) might end
  		// up deleting each other's directories and leave non-retrievable files, without necessarily
  		// causing an exception. That results in very subtle issues, like output files looking as if
  		// they are not getting created.
  
  		// we acquire the lock interruptibly here, to make sure that concurrent threads waiting
  		// here can cancel faster
  		try {
  			OUTPUT_DIRECTORY_INIT_LOCK.lockInterruptibly();
  		}
  		catch (InterruptedException e) {
  			// restore the interruption state
  			Thread.currentThread().interrupt();
  
  			// leave the method - we don't have the lock anyways
  			throw new IOException("The thread was interrupted while trying to initialize the output directory");
  		}
  
  		try {
  			// check if path exists
  			if (exists(outPath)) {
  				// path exists, check write mode
  				switch(writeMode) {
  
  				case NO_OVERWRITE:
  					// file or directory may not be overwritten
  					throw new IOException("File or directory already exists. Existing files and directories are not overwritten in " +
  							WriteMode.NO_OVERWRITE.name() + " mode. Use " + WriteMode.OVERWRITE.name() +
  								" mode to overwrite existing files and directories.");
  
  				case OVERWRITE:
  					// output path exists. We delete it and all contained files in case of a directory.
  					try {
  						delete(outPath, true);
  					} catch (IOException e) {
  						// Some other thread might already have deleted the path.
  						// If - for some other reason - the path could not be deleted,
  						// this will be handled later.
  					}
  					break;
  
  				default:
  					throw new IllegalArgumentException("Invalid write mode: " + writeMode);
  				}
  			}
  
  			if (createDirectory) {
  				// Output directory needs to be created
  				try {
  					if (!exists(outPath)) {
  						mkdirs(outPath);
  					}
  				} catch (IOException ioe) {
  					// Some other thread might already have created the directory.
  					// If - for some other reason - the directory could not be created
  					// and the path does not exist, this will be handled later.
  				}
  
  				// double check that the output directory exists
  				return exists(outPath) && getFileStatus(outPath).isDir();
  			}
  			else {
  				// single file case: check that the output path does not exist and
  				// an output file can be created by the output format.
  				return !exists(outPath);
  			}
  		}
  		finally {
  			OUTPUT_DIRECTORY_INIT_LOCK.unlock();
  		}
  	}