Can not read from device. line 422 file save_data.cpp

I'm trying to fetch a large buffer (24 million points) from my DS1104Z scope and it fails with a Can not read from device. line 422 file save_data.cpp message every time, close to the end of the transfer: image

Always fails when fetching sample between 20.25M and 20.5M (always at about 84%).

$ dsremote 
tmc_lan write: *IDN?
tmc_lan write: :CHAN1:BWL?
tmc_lan write: :CHAN1:COUP?
tmc_lan write: :CHAN1:DISP?
tmc_lan write: :CHAN1:INV?
tmc_lan write: :CHAN1:OFFS?
tmc_lan write: :CHAN1:PROB?
tmc_lan write: :CHAN1:UNIT?
tmc_lan write: :CHAN1:SCAL?
tmc_lan write: :CHAN1:VERN?
tmc_lan write: :CHAN2:BWL?
tmc_lan write: :CHAN2:COUP?
tmc_lan write: :CHAN2:DISP?
tmc_lan write: :CHAN2:INV?
tmc_lan write: :CHAN2:OFFS?
tmc_lan write: :CHAN2:PROB?
tmc_lan write: :CHAN2:UNIT?
tmc_lan write: :CHAN2:SCAL?
tmc_lan write: :CHAN2:VERN?
tmc_lan write: :CHAN3:BWL?
tmc_lan write: :CHAN3:COUP?
tmc_lan write: :CHAN3:DISP?
tmc_lan write: :CHAN3:INV?
tmc_lan write: :CHAN3:OFFS?
tmc_lan write: :CHAN3:PROB?
tmc_lan write: :CHAN3:UNIT?
tmc_lan write: :CHAN3:SCAL?
tmc_lan write: :CHAN3:VERN?
tmc_lan write: :CHAN4:BWL?
tmc_lan write: :CHAN4:COUP?
tmc_lan write: :CHAN4:DISP?
tmc_lan write: :CHAN4:INV?
tmc_lan write: :CHAN4:OFFS?
tmc_lan write: :CHAN4:PROB?
tmc_lan write: :CHAN4:UNIT?
tmc_lan write: :CHAN4:SCAL?
tmc_lan write: :CHAN4:VERN?
tmc_lan write: :TIM:OFFS?
tmc_lan write: :TIM:SCAL?
tmc_lan write: :TIM:DEL:ENAB?
tmc_lan write: :TIM:DEL:OFFS?
tmc_lan write: :TIM:DEL:SCAL?
tmc_lan write: :TIM:MODE?
tmc_lan write: :TRIG:COUP?
tmc_lan write: :TRIG:MODE?
tmc_lan write: :TRIG:EDG:SLOP?
tmc_lan write: :TRIG:EDG:SOUR?
tmc_lan write: :TRIG:EDG:SOUR CHAN1
tmc_lan write: :TRIG:EDG:LEV?
tmc_lan write: :TRIG:EDG:SOUR CHAN2
tmc_lan write: :TRIG:EDG:LEV?
tmc_lan write: :TRIG:EDG:SOUR CHAN3
tmc_lan write: :TRIG:EDG:LEV?
tmc_lan write: :TRIG:EDG:SOUR CHAN4
tmc_lan write: :TRIG:EDG:LEV?
tmc_lan write: :TRIG:EDG:SOUR CHAN1
tmc_lan write: :TRIG:HOLD?
tmc_lan write: :DISP:GRID?
tmc_lan write: :MEAS:COUN:SOUR?
tmc_lan write: :DISP:TYPE?
tmc_lan write: :ACQ:TYPE?
tmc_lan write: :ACQ:AVER?
tmc_lan write: :DISP:GRAD:TIME?
tmc_lan write: :MATH:FFT:SPL?
tmc_lan write: :MATH:DISP?
tmc_lan write: :MATH:FFT:UNIT?
tmc_lan write: :MATH:FFT:SOUR?
tmc_lan write: :MATH:FFT:HSC?
tmc_lan write: :MATH:FFT:HCEN?
tmc_lan write: :MATH:OFFS?
tmc_lan write: :MATH:SCAL?
tmc_lan write: :DEC1:MODE?
tmc_lan write: :DEC1:DISP?
tmc_lan write: :DEC1:FORM?
tmc_lan write: :DEC1:POS?
tmc_lan write: :DEC1:THRE:CHAN1?
tmc_lan write: :DEC1:THRE:CHAN2?
tmc_lan write: :DEC1:THRE:CHAN3?
tmc_lan write: :DEC1:THRE:CHAN4?
tmc_lan write: :DEC1:THRE:AUTO?
tmc_lan write: :DEC1:UART:RX?
tmc_lan write: :DEC1:UART:TX?
tmc_lan write: :DEC1:UART:POL?
tmc_lan write: :DEC1:UART:END?
tmc_lan write: :DEC1:UART:BAUD?
tmc_lan write: :DEC1:UART:WIDT?
tmc_lan write: :DEC1:UART:STOP?
tmc_lan write: :DEC1:UART:PAR?
tmc_lan write: :DEC1:SPI:CLK?
tmc_lan write: :DEC1:SPI:MISO?
tmc_lan write: :DEC1:SPI:MOSI?
tmc_lan write: :DEC1:SPI:CS?
tmc_lan write: :DEC1:SPI:SEL?
tmc_lan write: :DEC1:SPI:MODE?
tmc_lan write: :DEC1:SPI:TIM?
tmc_lan write: :DEC1:SPI:POL?
tmc_lan write: :DEC1:SPI:EDGE?
tmc_lan write: :DEC1:SPI:WIDT?
tmc_lan write: :DEC1:SPI:END?
tmc_lan write: :FUNC:WREC:ENAB?
tmc_lan write: :STOP
tmc_lan write: :WAV:MODE RAW
tmc_lan write: :WAV:YINC?
tmc_lan write: :WAV:YREF?
tmc_lan write: :WAV:YOR?
tmc_lan write: :WAV:STAR 1
tmc_lan write: :WAV:STOP 250000
received 250000 bytes, total 250000 bytes
tmc_lan write: :WAV:STAR 250001
tmc_lan write: :WAV:STOP 500000
received 250000 bytes, total 500000 bytes
tmc_lan write: :WAV:STAR 500001
tmc_lan write: :WAV:STOP 750000
received 250000 bytes, total 750000 bytes
tmc_lan write: :WAV:STAR 750001
tmc_lan write: :WAV:STOP 1000000
received 250000 bytes, total 1000000 bytes
tmc_lan write: :WAV:STAR 1000001
tmc_lan write: :WAV:STOP 1250000
received 250000 bytes, total 1250000 bytes
tmc_lan write: :WAV:STAR 1250001
tmc_lan write: :WAV:STOP 1500000
received 250000 bytes, total 1500000 bytes
tmc_lan write: :WAV:STAR 1500001
tmc_lan write: :WAV:STOP 1750000
received 250000 bytes, total 1750000 bytes
tmc_lan write: :WAV:STAR 1750001
tmc_lan write: :WAV:STOP 2000000
received 250000 bytes, total 2000000 bytes
tmc_lan write: :WAV:STAR 2000001
tmc_lan write: :WAV:STOP 2250000
received 250000 bytes, total 2250000 bytes
tmc_lan write: :WAV:STAR 2250001
tmc_lan write: :WAV:STOP 2500000
received 250000 bytes, total 2500000 bytes
tmc_lan write: :WAV:STAR 2500001
tmc_lan write: :WAV:STOP 2750000
received 250000 bytes, total 2750000 bytes
tmc_lan write: :WAV:STAR 2750001
tmc_lan write: :WAV:STOP 3000000
received 250000 bytes, total 3000000 bytes
tmc_lan write: :WAV:STAR 3000001
tmc_lan write: :WAV:STOP 3250000
received 250000 bytes, total 3250000 bytes
tmc_lan write: :WAV:STAR 3250001
tmc_lan write: :WAV:STOP 3500000
received 250000 bytes, total 3500000 bytes
tmc_lan write: :WAV:STAR 3500001
tmc_lan write: :WAV:STOP 3750000
received 250000 bytes, total 3750000 bytes
tmc_lan write: :WAV:STAR 3750001
tmc_lan write: :WAV:STOP 4000000
received 250000 bytes, total 4000000 bytes
tmc_lan write: :WAV:STAR 4000001
tmc_lan write: :WAV:STOP 4250000
received 250000 bytes, total 4250000 bytes
tmc_lan write: :WAV:STAR 4250001
tmc_lan write: :WAV:STOP 4500000
received 250000 bytes, total 4500000 bytes
tmc_lan write: :WAV:STAR 4500001
tmc_lan write: :WAV:STOP 4750000
received 250000 bytes, total 4750000 bytes
tmc_lan write: :WAV:STAR 4750001
tmc_lan write: :WAV:STOP 5000000
received 250000 bytes, total 5000000 bytes
tmc_lan write: :WAV:STAR 5000001
tmc_lan write: :WAV:STOP 5250000
received 250000 bytes, total 5250000 bytes
tmc_lan write: :WAV:STAR 5250001
tmc_lan write: :WAV:STOP 5500000
received 250000 bytes, total 5500000 bytes
tmc_lan write: :WAV:STAR 5500001
tmc_lan write: :WAV:STOP 5750000
received 250000 bytes, total 5750000 bytes
tmc_lan write: :WAV:STAR 5750001
tmc_lan write: :WAV:STOP 6000000
received 250000 bytes, total 6000000 bytes
tmc_lan write: :WAV:STAR 6000001
tmc_lan write: :WAV:STOP 6250000
received 250000 bytes, total 6250000 bytes
tmc_lan write: :WAV:STAR 6250001
tmc_lan write: :WAV:STOP 6500000
received 250000 bytes, total 6500000 bytes
tmc_lan write: :WAV:STAR 6500001
tmc_lan write: :WAV:STOP 6750000
received 250000 bytes, total 6750000 bytes
tmc_lan write: :WAV:STAR 6750001
tmc_lan write: :WAV:STOP 7000000
received 250000 bytes, total 7000000 bytes
tmc_lan write: :WAV:STAR 7000001
tmc_lan write: :WAV:STOP 7250000
received 250000 bytes, total 7250000 bytes
tmc_lan write: :WAV:STAR 7250001
tmc_lan write: :WAV:STOP 7500000
received 250000 bytes, total 7500000 bytes
tmc_lan write: :WAV:STAR 7500001
tmc_lan write: :WAV:STOP 7750000
received 250000 bytes, total 7750000 bytes
tmc_lan write: :WAV:STAR 7750001
tmc_lan write: :WAV:STOP 8000000
received 250000 bytes, total 8000000 bytes
tmc_lan write: :WAV:STAR 8000001
tmc_lan write: :WAV:STOP 8250000
received 250000 bytes, total 8250000 bytes
tmc_lan write: :WAV:STAR 8250001
tmc_lan write: :WAV:STOP 8500000
received 250000 bytes, total 8500000 bytes
tmc_lan write: :WAV:STAR 8500001
tmc_lan write: :WAV:STOP 8750000
received 250000 bytes, total 8750000 bytes
tmc_lan write: :WAV:STAR 8750001
tmc_lan write: :WAV:STOP 9000000
received 250000 bytes, total 9000000 bytes
tmc_lan write: :WAV:STAR 9000001
tmc_lan write: :WAV:STOP 9250000
received 250000 bytes, total 9250000 bytes
tmc_lan write: :WAV:STAR 9250001
tmc_lan write: :WAV:STOP 9500000
received 250000 bytes, total 9500000 bytes
tmc_lan write: :WAV:STAR 9500001
tmc_lan write: :WAV:STOP 9750000
received 250000 bytes, total 9750000 bytes
tmc_lan write: :WAV:STAR 9750001
tmc_lan write: :WAV:STOP 10000000
received 250000 bytes, total 10000000 bytes
tmc_lan write: :WAV:STAR 10000001
tmc_lan write: :WAV:STOP 10250000
received 250000 bytes, total 10250000 bytes
tmc_lan write: :WAV:STAR 10250001
tmc_lan write: :WAV:STOP 10500000
received 250000 bytes, total 10500000 bytes
tmc_lan write: :WAV:STAR 10500001
tmc_lan write: :WAV:STOP 10750000
received 250000 bytes, total 10750000 bytes
tmc_lan write: :WAV:STAR 10750001
tmc_lan write: :WAV:STOP 11000000
received 250000 bytes, total 11000000 bytes
tmc_lan write: :WAV:STAR 11000001
tmc_lan write: :WAV:STOP 11250000
received 250000 bytes, total 11250000 bytes
tmc_lan write: :WAV:STAR 11250001
tmc_lan write: :WAV:STOP 11500000
received 250000 bytes, total 11500000 bytes
tmc_lan write: :WAV:STAR 11500001
tmc_lan write: :WAV:STOP 11750000
received 250000 bytes, total 11750000 bytes
tmc_lan write: :WAV:STAR 11750001
tmc_lan write: :WAV:STOP 12000000
received 250000 bytes, total 12000000 bytes
tmc_lan write: :WAV:STAR 12000001
tmc_lan write: :WAV:STOP 12250000
received 250000 bytes, total 12250000 bytes
tmc_lan write: :WAV:STAR 12250001
tmc_lan write: :WAV:STOP 12500000
received 250000 bytes, total 12500000 bytes
tmc_lan write: :WAV:STAR 12500001
tmc_lan write: :WAV:STOP 12750000
received 250000 bytes, total 12750000 bytes
tmc_lan write: :WAV:STAR 12750001
tmc_lan write: :WAV:STOP 13000000
received 250000 bytes, total 13000000 bytes
tmc_lan write: :WAV:STAR 13000001
tmc_lan write: :WAV:STOP 13250000
received 250000 bytes, total 13250000 bytes
tmc_lan write: :WAV:STAR 13250001
tmc_lan write: :WAV:STOP 13500000
received 250000 bytes, total 13500000 bytes
tmc_lan write: :WAV:STAR 13500001
tmc_lan write: :WAV:STOP 13750000
received 250000 bytes, total 13750000 bytes
tmc_lan write: :WAV:STAR 13750001
tmc_lan write: :WAV:STOP 14000000
received 250000 bytes, total 14000000 bytes
tmc_lan write: :WAV:STAR 14000001
tmc_lan write: :WAV:STOP 14250000
received 250000 bytes, total 14250000 bytes
tmc_lan write: :WAV:STAR 14250001
tmc_lan write: :WAV:STOP 14500000
received 250000 bytes, total 14500000 bytes
tmc_lan write: :WAV:STAR 14500001
tmc_lan write: :WAV:STOP 14750000
received 250000 bytes, total 14750000 bytes
tmc_lan write: :WAV:STAR 14750001
tmc_lan write: :WAV:STOP 15000000
received 250000 bytes, total 15000000 bytes
tmc_lan write: :WAV:STAR 15000001
tmc_lan write: :WAV:STOP 15250000
received 250000 bytes, total 15250000 bytes
tmc_lan write: :WAV:STAR 15250001
tmc_lan write: :WAV:STOP 15500000
received 250000 bytes, total 15500000 bytes
tmc_lan write: :WAV:STAR 15500001
tmc_lan write: :WAV:STOP 15750000
received 250000 bytes, total 15750000 bytes
tmc_lan write: :WAV:STAR 15750001
tmc_lan write: :WAV:STOP 16000000
received 250000 bytes, total 16000000 bytes
tmc_lan write: :WAV:STAR 16000001
tmc_lan write: :WAV:STOP 16250000
received 250000 bytes, total 16250000 bytes
tmc_lan write: :WAV:STAR 16250001
tmc_lan write: :WAV:STOP 16500000
received 250000 bytes, total 16500000 bytes
tmc_lan write: :WAV:STAR 16500001
tmc_lan write: :WAV:STOP 16750000
received 250000 bytes, total 16750000 bytes
tmc_lan write: :WAV:STAR 16750001
tmc_lan write: :WAV:STOP 17000000
received 250000 bytes, total 17000000 bytes
tmc_lan write: :WAV:STAR 17000001
tmc_lan write: :WAV:STOP 17250000
received 250000 bytes, total 17250000 bytes
tmc_lan write: :WAV:STAR 17250001
tmc_lan write: :WAV:STOP 17500000
received 250000 bytes, total 17500000 bytes
tmc_lan write: :WAV:STAR 17500001
tmc_lan write: :WAV:STOP 17750000
received 250000 bytes, total 17750000 bytes
tmc_lan write: :WAV:STAR 17750001
tmc_lan write: :WAV:STOP 18000000
received 250000 bytes, total 18000000 bytes
tmc_lan write: :WAV:STAR 18000001
tmc_lan write: :WAV:STOP 18250000
received 250000 bytes, total 18250000 bytes
tmc_lan write: :WAV:STAR 18250001
tmc_lan write: :WAV:STOP 18500000
received 250000 bytes, total 18500000 bytes
tmc_lan write: :WAV:STAR 18500001
tmc_lan write: :WAV:STOP 18750000
received 250000 bytes, total 18750000 bytes
tmc_lan write: :WAV:STAR 18750001
tmc_lan write: :WAV:STOP 19000000
received 250000 bytes, total 19000000 bytes
tmc_lan write: :WAV:STAR 19000001
tmc_lan write: :WAV:STOP 19250000
received 250000 bytes, total 19250000 bytes
tmc_lan write: :WAV:STAR 19250001
tmc_lan write: :WAV:STOP 19500000
received 250000 bytes, total 19500000 bytes
tmc_lan write: :WAV:STAR 19500001
tmc_lan write: :WAV:STOP 19750000
received 250000 bytes, total 19750000 bytes
tmc_lan write: :WAV:STAR 19750001
tmc_lan write: :WAV:STOP 20000000
received 250000 bytes, total 20000000 bytes
tmc_lan write: :WAV:STAR 20000001
tmc_lan write: :WAV:STOP 20250000
received 250000 bytes, total 20250000 bytes
tmc_lan write: :WAV:STAR 20250001
tmc_lan write: :WAV:STOP 20500000
Edited by M. Greyson Christoforo