Add try/finally to streams.