implemented timeout on read to manage windows fragments without freezing mac