Add preliminary code to write out edgelist