Checking if url is free before writing to Database

A bit more efficient, skipping the write and remove of urls when the target is already in use.