See Proposition 1 in http://www.fen.bilkent.edu.tr/~franz/ta/ta-flt.pdf and the paragraph following it. You have to adjust the terms in a potential counterexample to Fermat's Last Theorem for prime exponent $p \geq 5$ to make the Frey curve semistable.  Whether or not *now* modularity is known in greater generality, Wiles could not handle the general case but he could handle the semistable case and that is good enough for FLT.