Cleaned up printing of results to file.