open my $fh, '>', $filelist or die "Can't open $filelist: $!";