added dublicate url checking and more descriptive error messages