You must name and open your file before you can write to it.
In Linux/UNIX, if you start the file name with "something/project1/timings", it should be in your home directory as "/home/me/something/project1/timings".
The example given works for a WINDOWS machine with a "K" drive.
If you separate the variables you are writing with "\t" and add a "\n" on the end, you can open the file in Excel (or other spreadsheet) as a tab delimeted file and have all
your timings ready to graph.
Do not forget to close your file or you will lose