BTW, info for is deprecated and may stop working unexpectedly.
You can replace:
set theFile to item 1 of someSource as alias
set theFileInfo to info for theFile
set theName to name of theFileInfo
set theExt to name extension of theFileInfo
with:
set theFile to item 1 of someSource as alias
set theName to name of theFile
set theExt to name extension of theFile