open(my $fh2, ">", $output) or die "Unable to open file '$output': $!\n";