How to fix the crash in the run function is described here: https://manual.zorro-project.com/trouble.htm

HistoryFolder sets the history folder, not the z.ini folder.

You can have the asset.csv files for your scripts in any folder. For this just add the path to the file name in assetHistory(). You can store script assigned paths in some global file.