-- this is a stand-alone script
local function run(event)
print("lua io.write test")
local f = io.open("foo.bar", "a") -- open file in append mode
io.write(f, "first line\r\nsecond line\r\n")
io.write(f, 4, "\r\n", 35.6778, "\r\n") -- one can write multiple items at the same time
return 1 -- this will end the script execution