Update install.sh

Added integrity checks and fixed a bug