expose close and open method in plugin