code: public void writeFile(String aFilePath, byte[] aData, boolean append) throws IOException
     {
        Object lock = retrieveLock(aFilePath);      
        synchronized (lock) 
        {
           IO.writeFile(aFilePath, aData,append);
        }
     
     }
docs: Write binary file data
  
  @param aFilePath the file path to write
  @param aData the data to write
  @param append to append or not
  @throws IOException when an IO error occurs