use string streams in reading index file