restore new lines in phantomjs stream