Defined function UniqueID::writeDefects
This function writes the defects along with their unique id and
parameters to a file.