Added check for duplicate uploads