Adding sleep to wait for phantomjs to be ready