Added support for file and dir with same name