Added db debugging script, to fix issues