     writeExceptions(exceptions, "Nested exception")
   else if stderr
     process.stdout.write "\n  #{makeDashes("Output from stderr")}\n"
-    process.stdout.write stderr.replace(/^(\s*\S.*)$/mg, "  $1")
+    process.stdout.write stderr.replace(/^([^\S\n]*\S.*)$/mg, "  $1")
 
 # In case you forget, you put this in its own method to get an empty namespace.
 sendOutput = (output) ->

    else if exception.json.stderr? and exception.json.stderr.length
      stderr = exception.json.stderr
      exception.json.stderr = "v-V-v See below. v-V-v"
    json = inspect(exception.json, false, 1000).replace(/^(\s*\S.*)$/mg, "    $1")
    process.stdout.write "#{json}\n"
  for element in exception.stack
    if element.method

          else if record.json.stderr? and record.json.stderr.length
            stderr = record.json.stderr
            record.json.stderr = "v-V-v  See below. v-V-v"
          json = inspect(record.json, false, 1000).replace(/^([^\S\n]*\S.*)$/mg, "  $1")
          process.stdout.write "#{json}\n"

        if record.exceptions
          writeExceptions(record.exceptions, "Uncaught exception")
        else if stderr
          process.stdout.write "\n  #{makeDashes("Output from stderr")}\n"
          process.stdout.write stderr.replace(/^([^\S\n]*\S.*)$/mg, "  $1")

fs.open "/var/log/messages", "r", (error, fd) ->
  throw error if error
