public static @NotNull String syncWithSharedFile(@NotNull String fileName, @NotNull String installationId, @NotNull Preferences prefs, @NotNull String prefsKey) {
    try {
      final String appdata = System.getenv("APPDATA");
      if (appdata != null) {
        final File dir = new File(appdata, "JetBrains");
        if (dir.exists() || dir.mkdirs()) {
          final File permanentIdFile = new File(dir, fileName);
          String fromFile = "";
          if (permanentIdFile.exists()) {
            fromFile = loadFromFile(permanentIdFile).trim();
          }
          if (!fromFile.isEmpty()) {
            if (!fromFile.equals(installationId)) {
              installationId = fromFile;
              prefs.put(prefsKey, installationId);
            }
          }
          else {
            writeToFile(permanentIdFile, installationId);
          }
        }
      }
    }
    catch (Throwable ex) {
      LOG.info("Error synchronizing Installation ID", ex);
    }
    return installationId;
  }
public static @NotNull String syncWithSharedFile(@NotNull String fileName, @NotNull String installationId, @NotNull Preferences prefs, @NotNull String prefsKey)