'taget_file' shouldn't be quoted here.

Can you explain the usage of  `map` here - it's not immediately obvious to me what it's for so it probably needs a comment or some other explanation.