Automatically remove dupe urls

fix #2321
Display more detailed error, only if it exists