private static void WriteJournal(IStorageFile journalFile, XElement journal) { string content = journal.ToString(); using (var stream = journalFile.CreateFile()) { using (var tw = new StreamWriter(stream)) { tw.Write(content); } } }