modified db and delete checkErr

modified db and delete checkErr