Writes serial data to a text file with time stamp