fix a few bugs, change Const.phantomJSPath to function to avoid null pointer