Added retry on scan fail (due to long pauses between two consecutive
nextRecord())