Added a filewriter in order to write output to file.
Just modifying some print statements