syntax and logic errors in install script