https://mamchenkov.net/wordpress/2017/03/22/bulletproof-bash-stop-script-on-error/
Bulletproof Bash : Stop script on error