Added option to enable/disable emptying the db