final version whith error message 

Signed-off-by: medalibettaieb <medali.bettaieb@esprit.ens.tn>