DBSync and triggers
Added a debug function in tools