added checks to detect the URI has not changed after calling changeFilePathToPublic and changeFilePathToPrivate
Closes #3515354