Debug message
Checks for _database == nil, and display wait window if mainThread