Fixed duplicated edges. Added writing to zip file with -z option