added more logging to debug the issue with one of the queries