Refactor diagnostics printer so that it uses specified stream to output diagnostics instead of hardcoded `stderr` that is there now
Refactor diagnostics printer so that it uses specified stream to output diagnostics instead of hardcoded
stderrthat is there now