set -euf -o pipefailset -eIf a command fails, set -e will make the whole script exit, instead of just resuming on the next line.
set -uTreat unset variables as an error, and immediately exit.
set -fDisable filename expansion (globbing) upon seeing *, ?, etc.
set -o pipefailset -o pipefail causes a pipeline (for example, curl -s https://sipb.mit.edu/ | grep foo) to produce a failure return code if any command errors.
In addition echo should be avoided using printf instead.
Read this insightful post and the POSIX recommendation.