add exception handler and logging to weixin.log