Ensure all stream handles are closed as we use them