adding more detailed logging for duplicates