added flag for dumpDir