Add a context, track exported bindings.
Write to a configurable stream rather than stdout.