Completed knn algorithm to also print output to file.
Updated comments
Updated the printing to file to add another space.