Fixing an issue with metadata in transformers using queries
Add debug logging