handle phantomjs stderr events