added code to handle if the logging channel doesn't exist