Added checks for file name collision with the mount directory name.