added --index_file option to allow for file containing indices