retry read when fscanf error due to resource unavailable

I've found an error in read_value due to a collision in the AIN* file. The result was bad data returned
to the user. I added a simple change to detect the error and retry the read up to 3 times.