Indexing file into "index.txt"