handle different output format
Merge pull request #5304 from ticoann/wmmining_fix2

handle different output format