非同步使用 StreamWriter 將文字寫入檔案
// filename is a string with the full path
// true is to append
using (System.IO.StreamWriter file = new System.IO.StreamWriter(filename, true))
{
// Can write either a string or char array
await file.WriteAsync(text);
}