validate fclose()