wrote index file