Refactored  how logging works to remove alot of complexity and remove the dependency on files on disk.