race condition solved

deleting database while being opened resulted in strange behavior. Need
to wait for database to finish open before starting to delete it.