Add assertions for iterable/array contains.
Add output stream that performs an action on close.