docs: public static void fileRename(final File file, final String newPath, final Class clazz) {
          File newDestFile = new File(newPath);
          File lockFile = new File(newDestFile.getAbsolutePath() + ".lock");
          try {
              synchronized (clazz) {
                  FileChannel channel = new RandomAccessFile(lockFile, "rw").getChannel();
                  FileLock lock = channel.lock();
                  try {
                      try {
                          // Create parent directory structure if necessary
                          FileUtils.mkParentDirs(newDestFile);
                          Files.move(file.toPath(), newDestFile.toPath(),
                                  StandardCopyOption.REPLACE_EXISTING);
                      } catch (IOException ioe) {
                          throw new CoreException("Unable to move file " + file +
                                  " to destination " + newDestFile + ": " + ioe.getMessage());
                      }
                  } finally {
                      lock.release();
                      channel.close();
                  }
              }
          } catch (IOException e) {
              System.err.println("IOException: " + e.getMessage());
              e.printStackTrace(System.err);
              throw new CoreException("Unable to rename file: " + e.getMessage(), e);
          }
      }