Added code to open CSV. If the CSV doesn't exist, it will be created and the relevant column headers entered. If the file does exist, it is simply opened. Also moved the timer function to the beginning of the file.