Add comment to grab_file
Move creation of name mapping into method.