Modified main function to accept only 3 command-line args and also execute only ToTextfile(...)