mrcat: fix bug and use multi-threading