improved stability of the script

1. Added function `usage`
2. Added the condition before executing `setenv.sh`