Added support for creating the db if one not found