open, close and preserve stream index (#1)