solution writing url to file