code: public static synchronized void persist(String fileName, Object object)
  			throws IOException {
  		ObjectChecks.checkForNullReference(fileName, "fileName is null");
  		ObjectChecks.checkForNullReference(object, "object is null");
  
  		FileWriter fileWriter = null;
  		File f = null;
  
  		try {
  			fileWriter = new FileWriter(fileName);
  		} catch (IOException e) {
  			f = new File(fileName);
  			if (f.isDirectory()) {
  				throw new IOException(fileName + " is a directory");
  			} else {
  				throw new IOException("Could not create " + fileName + ": "
  						+ e.getMessage());
  			}
  		}
  
  		Yaml yaml = new Yaml(mOptions);
  		yaml.dump(object, fileWriter);
  		fileWriter.close();
  	}
docs: Save a given {@link Object} to the yml-file.
  
  @param fileName
  The file name of the yml-file.
  @param object
  The {@link Object} to be stored.
  @throws IOException
  If the file could not be opened, created (when it doesn't
  exist) or the given filename is a directory.