added debug $i to the phantomjs log