fix open method and chnaged execute scripts for phantomjs