Cannot reopen an active stream.

#6066   Run-time catchable error

Cannot reopen an active stream.

Additional Information

For stream 'X'.

Explanation

A stream on the active stack may not be closed or reopened, even if it is not on the top of the stack. The stream must be completely removed from the stack, either by using the output-to action, or by waiting until element rules have ended, before the stream can be reopened.