Abstract close on exit