Wrap map function in a list so file.append will work
Merge pull request #18170 from rallytime/file_append_fix

Wrap map function in a list so file.append will work