ADD : some error checks