Add Dirty flag to dbRoot to prevent saving of non dirty data to speed up the process :)
Added code to prevent save if no change to data