SD Card Logging to a text file, fails after sometime?

Hello!! Everyone
I am using SDFat library to log data into memory card. My data length is of around 161 bytes with \n as delimiter.
I am logging at 2 logs per second, every things works fine for short duration.
I kept my device under test on 20:56:06,01/30/15 on Friday.
I works fine on Friday, then log was okay on Saturday and Sunday but it works for short time on Monday, the last correct reading value was at 02:39:28,02/02/15

After that i am getting junk values in my tex file.
My text file name is INT_001.txt, is there any limitation on the size of text files, the file size created is around 17MB, in this two days logging.
My SD Card writing is as follow:-

// set the current working directory for open() to Internal SD Card
				intSD.chvol();
				if (!myFile.open(filename, O_RDWR | O_CREAT | O_AT_END))
				{
					Serial.println("File Not Created or Opened");
				}
				else
				{
					// Using '\n' as delimiter
					while(*buffer != '\n')
					{
						myFile.print(*buffer);
						buffer++;
					}
					myFile.print('\n');
					myFile.close();		// Close the file
				}

Any Suggestion please.

Put the code for the whole sketch up not just the part you guess is relevant that way others can test it or see what is wrong rather than just try and work it out by guesswork.

Thanks for your reply, but it is not possible for me to upload the whole code.
I am using Atmel Studio and Arduino libraries, integrated in it, to write the whole code.

Everything works fine, but after few hours like 10 hours the log gets corrupted.
Yesterday i had tested it a speed of 200ms per log and set it for 12 hours, it gets corrupted and automatically gets okay after sometime.
My File size created yesterday was around 25MB.

My Function for writing to memory card is as follow:-

SelectInternalSD();
// set the current working directory for open() to Internal SD Card
intSD.chvol();
if (!myFile.open(filename, O_RDWR | O_CREAT | O_AT_END))
{
	e_error = SB_ERR_FILE_INT_SD;
}
else
{
	// Using '\n' as delimiter
	while(*buffer != '\n')
	{
		myFile.print(*buffer);
		buffer++;
	}
	myFile.print('\n');
	myFile.close();		// Close the file
}
DeSelectInternalSD();

buffer is a pointer to global variable which contains data to be written into memory card.
Do i have to disable interrupts while writing to memory cards.