Update index and eventually reformat