recursive implementation of consensus
combine files specified in another file