Fix a small but in how sourcedids were put into the database
Get more verbose in the case of an error.