This is a simple, small (660 byte) experimental module designed to stop all files and devices being closed at once by program or by accidental command, which can cause some programs problems. It may be of use during development, or when there are suspicions of something closing all files accidentally.
It will trap all instances of the command *Close, and in BASIC CLOSE#0, indeed anything that results in a SWI OS_Find with r0 and r1=0, which indicates all files on the current filing system are to be closed.
When OS_Find,0,0 is detected, a prompt will be issued so that you are aware of a potential problem:
<taskname> attempting to close all open files in <filingsystem>
with options to Fail or Allow, whether in the Desktop or single-tasking.