allow fclose on stdout to prevent valgrind still-reachable error