add error message for case of bad serialize