Make db connect optional