Ensure generated reference string is unique.
Remove debug text.