add error print for phantomjs