add abort_on_error function to settings.sh, use it