PB write error!

hello,everyone, I want to output the data to a file and I wrote following code,
{
ofstream out(“setaf.txt”);
out<<setaf[];
}
savemesh(th2,“th2.msh”)
the procedure exect due to “PB write error”. what’s wrong with it and how to fix it?