add error messages for switches