Ah, that is the difference between man and the whole Church. Man is fallible, the Church is not. The Church is the Body of Christ, and since Christ is God and Man, the Church is Divine and Human, Invisible and Visible. God cannot error, so neither can the Church. Just as the Holy Spirit led Jesus, so too dose He lead the Church; He leads the Church into all truths. Because God cannot deceive nor be deceived, being the Truth Itself, the Church cannot deceive nor be deceived. She is infallible, but she is not equal to Him in Knowledge and Wisdom - which is why He leads her (however, Jesus is equal to God, being God Incarnate). Hence, while man can make a mistake or do wrong, the Church can do neither, so, if the envoy was wrong, the whole Church would not; in other words, God would order the investigation in such a manner that the Church would not error on faith or morals (though she can still error in other ways, since she is not just divine but human, and we humans are fallible). I would also like to note that the whole Church isn’t on Earth but is on Earth, in Purgatory, and in Heaven; the whole Church is the Church Militant, Suffering, and Triumphant. Christ is the Invisible Head of the Church, and the Pope, in as far as he is the Vicar of Christ on Earth, is the Visible Head of the Church. Just as the King of Israel was God’s vicar, so too is the Pope God’s vicar. The Church is not double-headed but single-headed, for there is only one Christ, only one Meditator between God and man.
To give an example of how God works in His Church: the revelations given to Saint Faustina were initally rejected by the Vatican because it had received a poor translation of her diary; it wasn’t the real diary but a fake one sent to them. The Vatican found out, got a real translation of the diary eventually, and judged the revelations, and approved of them.
The same could happen to Medjugorje.