freopen() and fclose() implemented