Created custom logger that ensures the directory of the log file location exists, and if not creates