Cacheword issues

Work in progress.

First commit just adds logging.