my $type = shift;
my $matrix = shift;
$logger->info("Dumping $type scores to file...\n", 0, 'stamped');
my $debug_path = path_append($conf->param('basedir'), 'debug');
my $logfile = "$debug_path/${type}_scores.txt";
open(my $fh, '>', $logfile) or
throw("Unable to open $logfile for writing: $!");
#my $i = 0;
foreach my $entry (@{ $matrix->get_all_Entries }) {
#$logger->info($entry->to_string."\n");
#last if (++$i == 10);
print $fh ($entry->to_string."\n");
}
close($fh);
$logger->info("Done.\n\n", 0, 'stamped');
}