Rename variable, add more logging statements