Trap errors in chat log thread

Chat logging died at some point during GPLP today, and there was nothing in the log... hopefully this should help if that happens again.