Fixed my console color code and added some error checking when writing the log file (because I thought I was getting a write permission error).