If you want to write the somewhere relative to the quest directory, then you may want to use sol.file.open() instead of io.open(). By default it writes the file to the same location as your quest save data. This is probably what you'd want if you are writing supplemental data beyond what gets written to the save file.
If you are writing some sort of data log for debugging purposes, then you'd probably want to use io.open(), where you'd specify a full file path to somewhere on your local machine.
Also, be sure to read the documentation for io.open(), as you may want a write mode other than "w" depending on your usage.
local file = sol.file.open("MyFile.txt", "w")