Error handling for chatLog