Better handling of exit codes for reload.sh