pview: close fout before exiting