read .idx file