code: public static File getLastFile() {
          Preferences preferences = Preferences.userRoot().node(GuiBridgeHandler.PREFS_NODE_NAME);
  
          String userHome = System.getProperty("user.home");
          String lastPath = preferences.get(LAST_PATH, userHome);
          File file = new File(lastPath);
          if (!file.exists()) {
              return new File(userHome);
          }
          return file;
      }
docs: Handle the last set path preference.
  
  @return the last set path or the user home.