You need to change
String^ data = serialPort1->ReadExisting();
StreamWriter^ sw= File::AppendText(fileloc->Text);
sw->WriteLine(data);
sw->Flush();
sw->Close();
to
String^ data = serialPort1->ReadExisting();
StreamWriter^ sw= File::AppendText(fileloc->Text);
sw->Write(data);
sw->Flush();
sw->Close();
I suggest you look here as well for other functions you might have missed.
http://msdn.microsoft.com/en-us/library/system.io.streamwriter.aspx[
^]