Use the right variable and add more detail while logging

Change-Id: Id607de247984c3afd8adfba5a0918a2db955ea5d
Merge "Use the right variable and add more detail while logging"