words-completion: warning messages if something is wrong

It would be better to write unit tests, but warning messages are better
than nothing.