This would be cleaner as a static function flushEnabled() rather than a side effect of creating a CFile.  Also, it is probably clearer as a pair of variables - is it initialised and what is the value.