add some comments and -e option to exit on any command failure