Enhanced env check.
Added setters for isOpen.