Can you put an IF statement to check if file exists then only execute UPDATE?

You can use xp_getfiledetails.