Making install script a little more robust