Changed printRelationToStream to correctly handle corners and junctions