Added flexibility to DB calls in export listener