optimize nand install script