title: console.log doesn't return result in async after await
body: <p>I have a code that waits till file exist and returns file content. I run code, it waits for 'smscode.txt' file. After I upload 'smscode.txt' code finishes execution. That's correct.</p>
  
  <p>But for some reason console.log(2); doesn't display anything.
  Here is the result of my function execution.</p>
  
  <pre><code>c:\work\docker\test-npm&gt;node ideaOpen.js
  1
  
  c:\work\docker\test-npm&gt;
  </code></pre>
  
  <p><strong>Updated and simplified code version, without files</strong> </p>
  
  <p>I expect "2" to be displayed, but it does not. In 5 seconds script successfully finishes its work.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let smsCode = '';
  function checkSmsCode() {
      setTimeout(function(){
          smsCode = 1234;
      }, 5000);
  }
  checkSmsCode();
  
  let smsCodeExist = new Promise((resolve, reject) =&gt; {
      if (smsCode) {
          resolve(smsCode);
      }
  });
  
  (async () =&gt; {
      console.log(1);
      let a = await smsCodeExist;
      console.log(2);
  })();</code></pre>
  </div>
  </div>
  </p>