added the ability to write a line of text to a cache file
added code to write data to file