code: @SuppressWarnings("resource")
  	public static ISynchronizationPoint<IOException> savePropertiesFile(Properties properties, File file, Charset charset, byte priority) {
  		FileIO.ReadWrite io = new FileIO.ReadWrite(file, priority);
  		AsyncWork<Void,IOException> resize = io.setSizeAsync(0);
  		SynchronizationPoint<IOException> result = new SynchronizationPoint<>();
  		resize.listenInline(new Runnable() {
  			@Override
  			public void run() {
  				if (resize.hasError()) {
  					result.error(resize.getError());
  					io.closeAsync();
  					return;
  				}
  				savePropertiesFile(properties, io, charset, priority, true).listenInline(result);
  			}
  		});
  		return result;
  	}
docs: Save properties to a file.