Fix var in logging