code: private void checkFileDataSink(FileDataSinkBase<?> fileSink) {
  		String path = fileSink.getFilePath();
  		if (path == null) {
  			throw new InvalidProgramException("File path of FileDataSink is null.");
  		}
  		if (path.length() == 0) {
  			throw new InvalidProgramException("File path of FileDataSink is empty string.");
  		}
  		
  		try {
  			Path p = new Path(path);
  			String scheme = p.toUri().getScheme();
  			
  			if (scheme == null) {
  				throw new InvalidProgramException("File path \"" + path + "\" of FileDataSink has no file system scheme (like 'file:// or hdfs://').");
  			}
  		} catch (Exception e) {
  			throw new InvalidProgramException("File path \"" + path + "\" of FileDataSink is an invalid path: " + e.getMessage());
  		}
  		checkDataSink(fileSink);
  	}
docs: Checks if FileDataSink is correctly connected. In case that the
  contract is incorrectly connected a RuntimeException is thrown.
  
  @param fileSink
  FileDataSink that is checked.