refact error messages