use blocking read with timeout