Update index.js

only add error prompt