CFile: fix null pointer dereference in Stat() and Write()
[vfs] CFile: add null pointers checks