added quit clause to repeated failed readings