private Properties loadOldProperties(File oldPropsFile) throws IOException {
   Properties oldProps = new Properties();
   if (oldPropsFile.exists()) {
     FileInputStream is = new FileInputStream(oldPropsFile);
     oldProps.load(is);
     is.close();
   }
   return oldProps;
 }
  private void saveNewProperties(String path, Properties oldProps) throws Exception {
    File newPropsFile = new File(path + FileSystemPage.propertiesFilename);
    WikiPageProperties newProps = new WikiPageProperties();

    for (Iterator iterator = oldProps.keySet().iterator(); iterator.hasNext(); ) {
      String key = (String) iterator.next();
      String value = (String) oldProps.get(key);
      if (!"false".equals(value)) newProps.set(key, value);
    }

    FileOutputStream os = new FileOutputStream(newPropsFile);
    newProps.save(os);
    os.close();
  }