Detect overlapping junctions.
Write to file.