add -ex when run script to debug