[FEATURE] Optionally supply output_stream