cleanup open/close