Assalaamu alaykum. Suppose that the situation is like this: The time for the prayer has come, if I go to the nearest masjid, I can catch the prayer, but the imam's recitation has some mistakes, even in Surah Al-Faatihah. There is another masjid in which the imam's recitation is good, but that masjid is bit farther away (about 7 min walking distance). If I go to that masjid, then most probably the prayer will be end before I reach it. So what should I do then?
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
If this imaam makes mistakes that do not change the meaning and thus do not invalidate the prayer, and the situation is as you mentioned, that if you go to another masjid you may miss the congregational prayer or some of it, then you may pray in this nearby masjid.
However, if the imaam makes mistakes that change the meaning and thus invalidate the prayer, like if he changes one letter with another letter in Soorah Al-Faatihah, for example, then you must not pray behind him. Rather, you must look for another masjid, even if you do not catch up with the whole prayer. For more benefit, please refer to fatwa 326782.
If you know that you are going to pray in a Masjid that is farther away, then you should go early enough to catch the congregational prayer. You should also know that if you arrive at the masjid and find that they have already prayed, without any negligence on your part, then you will get the reward by your intention.
Allah knows best.
You can search for fatwa through many choices