Updated the log function so it writes to a custom file type.