Move word list logging to a debug function