db: add clearer error handeling

Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>
Merge pull request #30 from inaes-tic/xaiki/fix-db-init

db: add clearer error handeling