title: Running nightmare to take screenshots works but takes keeps running .then
body: <p>I will be using nightmare to go through quite alot of URLs and take screenshots of the pages, which I would want it to do in the background. I'm testing it out and after it takes the screenshot it keeps printing done to the console without closing and eventually closes showing: </p>
  
  <pre><code>Search failed: { message: 'navigation error',
    code: -7,
    details: 'Navigation timed out after 30000 ms',
    url: 'http://www.google.com' }
  </code></pre>
  
  <p>What's the best way to do what I need to do above? </p>
  
  <pre><code> nightmare
      .useragent('Mozilla/5.0 (Windows NT 6.1; WOW64)')
      .goto('http://www.google.com')
      .screenshot('image.png')
      .end()
      .then(console.log("done"))
      .catch((error) =&gt; {
      console.error('Search failed:', error);
       });
  </code></pre>
  
  <p>how can I get this to stop after the screenshot has been taken, shouldn't it end with the end()?</p>
  
  <p>Would be grateful for any answers. Thanks</p>