Script to check link validity