Move CLOSE-WINDOW resource closing to :AFTER method