Changed the output to print urls on the fly as well as at the end