title: Problems with use fs.stat in nodejs
body: <p>I trying make read file parameters. When I make this code:</p>
  
  <pre><code>  var fs = require('fs'),
      size = new Object();
  fs.stat(file, function(err,stats){
           if(!err){
              size=stats;
           }
        })
     console.log(size);
  </code></pre>
  
  <p>It`s ok, when i trying use function:</p>
  
  <pre><code> var fs = require('fs'),
      size = new Object();
  function writeinfile(file){
     fs.stat(file, function(err,stats){
           if(!err){
              size=stats;
           }
        })
     console.log(size.size);  
  }
  writeinfile('error.log');
  </code></pre>
  
  <p>It`s not work. Could you help me that variant 2 work?</p>