[#2697] move debug code to dtor
[#2697] move debug code to dtor

janiheikkinen/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkinen/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkinen/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkinen/irods