Clarify logic.
Make database corruption message clearer.

Show correct database path depending on physical security level, and
make it clearer what is a directory and what is a file.
Merge remote branch 'operhiem1/database-corrupt' into next
Fix NPE
Fix NPE