Path content verification is updated to avoid class casting.