List of hotspot users to a file

Looks like his problem was related to the way he was running the script in the scheduler: http://forum.mikrotik.com/t/scheduler-and-script-creating-file/36004/1

Where are you running the script from?