replace index file