close $fh or die "ERROR: Closing pipe failed: $!";