You can, in ASH, catch Mafia errors with the "catch" keyword, so
is perhaps the simplest fix.
Code:
catch map_to_file(happenings,"BatMan_happenings_"+replace_string(my_name()," ","_")+".txt");
is perhaps the simplest fix.