Add log statements to lookup handling functions