better logging
log also occurrences of keys