Refactored logging code to separate functions. Added (untested) support for parse ratings and taste. Abstracted calls for writing records to file.