The book, Gospel Questions, Gospel Answers by David Ridges is such an amazing an resource for members of the Church of Jesus Christ of Latter-day Saints. With 100 hard questions with 100 answers, you don't want to miss out on this amazing book. Here is one of those questions, along with the answer given:
QUESTION: Is it true that the Prophet can’t lead us astray?
The Lord makes this clear in the Doctrine and Covenants. Early on, He explained the pattern whereby we can know that the Prophet would not be allowed to lead the Church astray.
17: And I have sent forth the fulness of my gospel by the hand of my servant Joseph; and in weakness have I blessed him;
18: And I have given unto him the keys of the mystery of those things which have been sealed, even things which were from the foundation of the world, and the things which shall come from this time until the time of my coming, if he abide in me [if he remains true to his calling as the Prophet], and if not, another will I plant in his stead [if not, I will remove him and place another in the calling as the Prophet].
This pattern is repeated by the Lord a bit later in the Doctrine and Covenants.
3: And this ye shall know assuredly—that there is none other appointed unto you to receive commandments and revelations until he be taken, if he abide in me [if the Prophet follows God’s instructions].
4: But verily, verily, I say unto you, that none else shall be appointed unto this gift except it be through him; for if it be taken from him [if he tries to lead the Church astray] he shall not have power except to appoint another in his stead [he would only have power to appoint a successor].
5: And this shall be a law unto you, that ye receive not the teachings of any that shall come before you as revelations or commandments;
6: And this I give unto you that you may not be deceived, that you may know they [any who accuse the Prophet of attempting to lead the Church astray] are not of me.
Those who claim that the Church is off track would do well to pay close attention to this ironclad promise from the Lord Himself.