Added option to turn of database logging to log file