Small updated to build script and flash script