Fix an error for script execution with commit specified. Also add 'set -e' option.