check if the page is not load
better checking
rm commented code
Merge pull request #1137 from lzhan/npmtest

Add checking of page loading.