Wrap db open call in retry
Run self-test in debug mode