update shell scripts
update error handling