The section on reading and writing local files contains detailed information on opening and writing to a file.An example for writing out an error file is
fileopen write, "c:\\errorlog.txt";filewriteline "An error has occurred";fileclose;