added stream writer