File f = new File(propFilePath);
if (!f.exists()) {
throw new IOException("properties path " + propFilePath + " does not exist");
}
props = new Properties();
props.load(new FileInputStream(propFilePath));
String indexRelativePath = props.getProperty("index.next");
if (indexRelativePath == null) {
throw new IllegalArgumentException("indexRelativePath not set in " + propFilePath);
}
nextIndex = Integer.toString(1 - Integer.parseInt(indexRelativePath));
curIndexPath = props.getProperty("index.fullpath") + indexRelativePath;
nextIndexPath = props.getProperty("index.fullpath") + nextIndex;