Adding --merge-duplicate feature