add a safe-guard against bad input

do not write empty original_edge_data_vector to file
Merge pull request #1053 from alex85k/patch-5

add a safe-guard against bad input