If wget fails, remove the empty file created
What does this MR do?
wget
creates an empty file in case of a failure (https://superuser.com/questions/166387/wget-o-writes-empty-files-on-failure). This results in the file containing an invalid JSON. With this change, the file is removed if wget
doesn't succeed.