Add bi-dir visualization and file output