removed reorder on the edge causing bugs (should be handled by user (add id order clause if similar value in the end row)
escape single quotes for delimiter values (quick n' dirty)