Provide output stream via the argument
Add Ifdef guard