added table and db names to output file