I'd like to write a log record in case of a failed attempt of a file reading(writing) operation, something like:

```
try
{
    //some file operation, for example:
    TextReader tr2 = new StreamReader(nfilepath);
    resultN = tr2.ReadLine();
    tr2.Close();             
}
catch (Exception ex)
{
   string recfilepath = "...
   string rectoadd = "RecDateTime=" + DateTime.Now.ToString()+ ...+ex.Message.ToString();
   File.AppendAllText(recfilepath, rectoadd);
}

```

Is this a correct way of doing that? What if in the above example the attempt of writing a log record (`File.AppendAllText(recfilepath, rectoadd);`) fail as well?