read idx file