build index file