Yeah, it's related to the files/maps/both topic. I think this function got overloaded because of a few lines up. https://github.com/gruntjs/grunt-contrib-concat/pull/59/files#diff-c393a8ca95eaa9a57c99b11eaa6548f5R162 I believe was part of the source that this PR was originally in. Coding from that I arrived at a dilemma of how to wrangle that. Though it was a false dilemma. The map written to the file system doesn't need to know the part of it's source that is the comment referring to it. So yeah, definitely going to change this.

On the situation of cases like being unable to write a map to the file system, that wouldn't be improved by having a different architecture. That's an error and handling that is outside the scope of this file. It should boot the error up and something else figures it out. Currently grunt would stop and tell the user the error.

I'm not worried about having a few more lines in `concat.js`. It'd be nice to have this the functionality in that and here be split but it's highly related so that'd be hard to do without doing the possibly bad magic demo'd here.