#6: Redefine on-error / on-close with final handlers only after open