Guarantee close cursors and streams