write to file with current date