Working on writing index to file then reading from it.