title: NodeJS: Asynchronous file read problems
body: <p>New to NodeJS.</p>
  
  <p>Yes I know I could use a framework, but I want to get a good grok on it before delving into the myriad of fine fine tools that are out there.</p>
  
  <p>my problem:</p>
  
  <pre><code>var img = fs.readFileSync(path);
  </code></pre>
  
  <p>the above works;</p>
  
  <pre><code>fs.readFile(path, function (err, data) 
          {
              if (err) throw err;
              console.log(data);
          });
  </code></pre>
  
  <p>the above doesn't work;</p>
  
  <p>the input path is : 'C:\NodeSite\chrome.jpg'</p>
  
  <p>oh and working on Windows 7.</p>
  
  <p>any help would be much appreciated.</p>
  
  <p><strong>Fixed</strong>
  Late night/morning programming, introduces errors that are hard to spot. The path was being set from two different places, and so the source path were different in both cases. Thankyou for your help. I am a complete numpty. :)</p>