Preparations for use of stream instead of printf