Removed newFile generation from sort algorithm and created its own class.