duplicated path/slugs issue

Now it checks for duplication in a loop. if duplication found it adds postfix number and keep checking until it founds unique slug/path