Fixed errors when initializing sqlconfig.xml for first time and when
sqlconfig.xml gets deleted.
Cleanup imports.