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.