Failed to flash to TX1

I am trying to follow the quick start guide and flash a downloaded fs and image to a TX1.
When trying to run flash.sh, I got this:

[Linux_for_Tegra]$ sudo ./flash.sh jetson-tx1 mmcblk0p1
Warning: missing eksfile (bootloader/eks.img), continue…
copying bctfile(/OriginalsTX1/Linux_for_Tegra/bootloader/t210ref/BCT/P2180_A00_LP4_DSC_204Mhz.cfg)… done.
copying initrd(/OriginalsTX1/Linux_for_Tegra/bootloader/l4t_initrd.img)… done.
populating kernel to rootfs… done.
populating initrd to rootfs… done.
populating extlinux.conf.emmc to rootfs… done.
populating /OriginalsTX1/Linux_for_Tegra/kernel/dtb/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb to rootfs… done.
done.
copying bcffile(/OriginalsTX1/Linux_for_Tegra/bootloader/t210ref/cfg/board_config_p2597-devkit.xml)… done.
Existing sosfile(/OriginalsTX1/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
copying tegraboot(/OriginalsTX1/Linux_for_Tegra/bootloader/t210ref/nvtboot.bin)… done.
Existing bpffile(/OriginalsTX1/Linux_for_Tegra/bootloader/bpmp.bin) reused.
copying wb0boot(/OriginalsTX1/Linux_for_Tegra/bootloader/t210ref/warmboot.bin)… done.
Existing tosfile(/OriginalsTX1/Linux_for_Tegra/bootloader/tos.img) reused.
copying dtbfile(/OriginalsTX1/Linux_for_Tegra/kernel/dtb/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb)… done.
Making system.img…
/dev/loop0 is not block device. Terminating…

Has anyone encounter similar problem? Any help are very appreciated.

Thanks

Found the answer from another topic.
/dev/loop0 does not exist, have to run sudo losetup --find before start flash.sh.