rename to avoid shadowing built-in type 'file'

Also fix 1 typo.