handle timeouts in read/write while cycles