wrote function to export stats to file
exporting optimal solutions to file