writing url to output file