stream open/close