I just made a 51,000 line file each line being 62 bytes long + cr lf, so 64 bytes each line, total bytes 3,264,000.
then i did this...

/write -il2 myfile.txt blah line 2

it added it fine.

So i suggest you scan your file for EOF markers byte value 0x1A (eof) which well terminate the file.

Also be aware that any byte value 0x00 (null) well be removed. (this appears to be mirc related maybe),
also a byte value 0x0A (lf) not preceded by a 0x0D (cr) well be replaced with 0x0D 0x0A (cr lf)

I well say tho there is a known bug with inserting lines.
I kept running into it, its that you only get to do 65535 inserts before mirc just wont do anymore untill you restart.

I uses this now.

window -c @realbigfilebuffer
window -hn @realbigfilebuffer
filter -cfw myfile.txt @realbigfilebuffer *
;
iline @realbigfilebuffer 2 Blah line 2
;
filter -cwf @realbigfilebuffer myfile.txt *
window -c @realbigfilebuffer