clean up checking if db exists