Clean up stream resource