write mesh to file