Fixed call to write DB to file in TextUI.cpp. Provides logging state now.