newName can be replaced with newPath