Error message "hdiutil: create failed - internal error" when using script to download MacOS Installer

Hi all,

Since there is an error message regarding installer corruption during installation. I need to re-download and recreate the bootable usb. I follow steps on https://dortania.github.io/OpenCore.../mac-install.html#downloading-macos-modern-os to make the installer with script, it shows the following error message (please see attachment). Any suggestion would be greatly appreciated.

Author: singyukng