Controlling LED and accessing SD using Mega 2560 and Ethernet Shield

The integration of your LED stuff into the sketch for the file delivery is probably the easier and better (because that sketch doesn't use the String class) solution.