Problem reading/writing mesh file

I ran this code on my computer

But when I open the saved grid file, it is blank. I don’t no why.