still, Write() can return -1, in CFile, CCurlFile, etc.
so the File::write should also pass the return value out, use int is better imo.