CLS gives Invalid IO device
nextZXOS 2.09, RC11, file stream access upsets CLS
After DIM #n to m, or NEXT #n to m or RETURN #n to m A CLS statement gives Invalid IO device
I infer that it’s trying to CLS the file.
Inserting a dummy PRINT; restores the presumption of #2 (closed).
Switching to the function rather than TO variants of the file pointer statements is also a workaround.