ensure that "index" is properly recognized in f.getProperty("index"). You might need to check if the property exists or debug by logging all available properties in f to confirm.