Renames old index file
Creates new index file