Some better implementation for openOnce and closeOnce