Here is a list of things to bear in mind when using the special file names that gawk provides:
dup()
'ed from file descriptor 4. Most of
the time this does not matter; however, it is important to not
close any of the files related to file descriptors 0, 1, and 2.
Doing so results in unpredictable behavior.