what does the filename option do in stylus.render function?

I have tried to change the filename parameter as per the sample codes (from official documentation) given below but it does not have any impact on my output.

I would expect that the filename would specify the path to either input or the output. However str is the input and needs to be defined and no output file gets generated based on the filename parameter.

So what does the filename option do in stylus.render function ?

Sample code from

var css = require('../')
  , str = require('fs').readFileSync(__dirname + '/basic.styl', 'utf8');

css.render(str, { filename: 'basic.styl' }, function(err, css){
    if (err) throw err;
    console.log(css);
});

Sample code from

var stylus = require('stylus');

stylus.render(str, { filename: 'nesting.css' }, function(err, css){
  if (err) throw err;
  console.log(css);
});

The filename parameter is used in error reporting, not as an input or output filename.

From the docs at http://learnboost.github.io/stylus/docs/js.html:

Simply require the module, and call render() with the given string of Stylus code, and (optional) options object.

Frameworks utilizing Stylus should pass the filename option to provide better error reporting.