"For these two years hath the famine been in the land; and there are yet five years, in which there shall be neither plowing or harvest.
And God sent me before you to preserve you a remnant in the earth, and to save you alive by a great deliverance." Genesis 45:6,7

........God used Joseph to preserve His people.

................He overrules Satan and He brings good out of the evil throughout the ages.