Add the close cleanup