Rename-PWDocument syntax

I have the following and am getting a Failed to rename document message.  Any idea why?

Rename-PWDocument -InputFolder 'Admin\Workspaces\TxDOT\LookUp Tables\Counties' -DocumentOldName 'Anderson00001' -DocumentNewName 'Anderson'

The documents exist.  They were created with:

$TexasCounties = 'Anderson','Andrews'
foreach ($county in $TexasCounties) {New-PWDocumentAbstract -FolderPath 'Admin\Workspaces\TxDOT\LookUp Tables\Counties' -DocumentName $county -Description '' }

(Yes that is a very shortened list to save room here)  They are Abstract Documents (just place holders) being used for a lookup table

I am trying to remove the 0001 from the file names created by the New-PWDocumentAbstract  commandlet and while I have the following code to do that, I got the same error so I simplified it to the above code for testing.

$newCounties = Get-PWDocumentsBySearch -FolderPath 'Admin\Workspaces\TxDOT\LookUp Tables\Counties'
foreach ($doc in $newCounties) {
$oldDocName = $doc.Name
$newDocName = $oldDocName.Substring(0,$doc.Name.Length-5)
Rename-PWDocument -InputFolder 'Admin\Workspaces\TxDOT\LookUp Tables\Counties' -DocumentOldName $oldDocName -DocumentNewName $newDocName
}

I am also looking for a way to remove the Description since the New-PWDocumentAbstract  commandlet also adds a desricption such as "Anderson - Abstract Document 00001" even though I send a value of ''

Parents Reply Children