local open and close