There's a very convenient function in Common-Lisp: "with-open file".
Could you add something similar to CLIPS, e.g. with syntax
(with-open file <file-name> <logical-name> [<mode>] [do]
<actions>
)
It's a detail but it would allow to have better structured and safer code.