add some errors control