Close all open nodes on exit