open my $PATTERN, "<", "$html_dir/$FigFile/$DirFile" or die "Unable to open pattern file: $!";