Add StreamToWriter which should have part of my last commit.