Update reference to old variable in logging statement