add function to output score files