trying to fix the 2nd export problem: added lock variable which
separates delete process from export, closed everything in DBExchanger.
Still not working...