Add logging for trie calls