Now writing to files with dates