It's amazing how much damage a leaky gutter or a misdriected downspout can do. I've seen gutter overflows neglected for years causing mold in the basement and downspouts dumping half a roof's water onto one corner of the foundation and literally eating it away. As a general rule get that water at least 5 feet away from the foundation or further if needed to slope away from the house! Click on image to link to this versatile model.
Look at the trouble they've taken at Lincoln's summer home, where he wrote the Emancipation Proclamation, to protect the foundation with period copper downspout extenders. By the way, my daughter gives tours here!
Downspout to the right clogged and filled this window well almost half way up, damaging the carpet inside.