Added code for phantomjs based error detection .