I've built my script and it is working correctly for updating and changing the URL as I require. The second part is if an error is thrown out I want the URL, Date/time and the error to be put in to a text file.
At the moment it is recording the URL and Date/time for everything and if an error it is capturing date/time, URL and the Error.
Because the script is running a lot of times I just want it to return a result to the notepad file on occasions where there is an error. What is it I'm doing wrong?