Handle errors in DecodeMessage, added logging