This type of if { if { if { pattern can be cleaner if you do:

if (! m_bFileAvailable) {
   // write to temp buffer
  return;
}

And then you avoid a whole level of indentation.  After all, you are checking for a condition which is basically "am I actually doing anything now that I've been called?"  And if the answer is no, clean up and return.