add closing the results file at the end