better logging when message parsing fails