updates the index file.