use correct vars in log statements