         .concat(@projectRootRubocopConfig(filePath))
 
       stdout = (output) =>
-        @rubocopOutput(filePath.replace(/.+\//, ""), output)
+        @rubocopOutput(output)
       stderr = (output) =>
-        @rubocopOutput(filePath.replace(/.+\//, ""), output)
+        @rubocopOutput(output)
 
       which command, (err) =>
         if (err)

      ''' }
    )

  rubocopOutput: (fileName, output) ->
    debug = atom.config.get('rubocop-auto-correct.debugMode')
    notification = atom.config.get('rubocop-auto-correct.notification')
    console.log(output) if debug

    if output.match("corrected")
      re = /^.+?(:[0-9]+:[0-9]+:.*$)/mg
      offenses = output.match(re)
      offenses.map (offense) ->
        message = offense.replace(re, fileName + "$1")
        console.log(message) if debug
        atom.notifications.addWarning(message) if notification
    else if output.match("no offenses")
      atom.notifications.addSuccess(output) if notification
    else
      atom.notifications.addInfo(output) if notification

  makeTempFile: (filename) ->
    directory = temp.mkdirSync()

  rubocopCommand: ->
    commandWithArgs = atom.config.get('rubocop-auto-correct.rubocopCommandPath')
                                .split(/\s+/).filter((i) -> i)
                                .concat(["--format", "json"])
    [commandWithArgs[0], commandWithArgs[1..]]

  autoCorrectBuffer: (buffer)  ->
