read index from file