Changed filter to avoid SQLException when trying to add duplicates
Added pre download check against the db