typo fixes in DB and added more logging