private async Task WriteToFile(string message) {
try {
await WriteBuffer(message, flush: false);
} catch (UnauthorizedAccessException ex) {
Trace.Fail(ex.ToString());
} catch (PathTooLongException ex) {
Trace.Fail(ex.ToString());
} catch (DirectoryNotFoundException ex) {
Trace.Fail(ex.ToString());
} catch (NotSupportedException ex) {
Trace.Fail(ex.ToString());
} catch (IOException ex) {
Trace.Fail(ex.ToString());
}
}