See if changing $file to $file.name helps.
_________________________
(... better days ahead)