@FellippeHeitor Thanks for testing.
I still have a problem (though as you say it is specific to my system).
My file was 4,526,566 bytes which gave the problem.
Test file of 3 bytes was OK.
I slowly went through the process of trying to work out at what point the file failed me. It took me all this time since my last reply but it appears now that if I take only the first 2,087,490 bytes it seems to be OK. However if I take one extra than this (2,087,491) then I get the problem.
With the the code that I supplied you above - is it even possible that my file (~4.5 Mbytes) could possibly break debug (even if it was binary nonsense)???
Below are the trailing bytes (as seen by NotePad) for the 2,087,491 byte file which fails - when I take off the last character is appears to be fine.
X9Y1yOEqjSUer03E8y2xe4bcl0LCfK+0U0cHVw8ckKmnK6Tt5m3GcUwuPm6tbDpTe7jJq/zVmbN4
Ip7k36/VZmZqcx0MwRlH8I0t4bRHw6nOp0tdub8dvsh