Update install.sh

Added error checks