Changed code to read db settings from configfile and support sqlite better