Not technically an answer to your question, but you could replace all that with:
string[] str = File.ReadAllLines("c:\\error.txt");
Edit (as promised):
Rather than missing a piece, it seems to me that you will have a duplicate of the last part. You're not reading a full 1024 bytes from the file, but you are turning all 1024 bytes into a string and appending it.
Your loop should be like this instead:
int bytesRead;
while ((bytesRead = fr.Read(b, 0, b.Length)) > 0)
{
data += encoding.GetString(b, 0, bytesRead);
}
Other than that: what Jon said :)