chore(logging): fix logging.error and make sure logger exists