Added Code to write ranking results to file in results folder