Clean and add error messages