add helper function, batch add explicit Close