don't close everything if the final result is closeable