Use code tags when posting, so that your code looks like this:
mysd = SD.open ("Data.txt", FILE_WRITE);
DO NOT open the file every pass through loop(), then close it again. This wastes a HUGE amount of time.
Open the file ONCE in setup() and then close the file when you are all done collecting data.