checks if URL exists before trying to download attachment