documented shortenPathsInValidator.R