Added simple system for writing data to a log file