Adding single database check

Yeah. Not fully tested(warning!!)