cleaning the index file