better logging for debugtools, added dumps with jsbeautifier support, change printTable to formatTable