James, with your script the file is written into a special folder, which differs from Mac to Windows.
Maybe you did not find it (on Mac it is placed within the Library Folder). You could try to wrie the file in a special directory (use the keyword FULLPATH).
Some good examples of writing and raeding text files you can find in the GDL Cookbook 3, including the saving of parameter values.
GDL Object Developer
MAC OSx 10.12