improved error message making easy i18n it. Cleaned a bit the logic