2 issues so far
It is printing to the output screen the $doc name twice - so it is reading the $doc and $folder as the $doc instead of as 2 seperate entries.
So when it produces the file, it places it in $home\(Current Month) instead of $home$folder\(Current Month)
(there is a folder named (Current Month) in $home and in $folder

Sample output:
ADAMSADAMS-1-1

Location should be:
$home\$folder\(Current Month) and
$home\$folder\SUBFOLDER1

Location it is:
$home\(Current Month)