title: how to change the function declaration to change the promise handling in node.js?
body: <p>I am new to node.js &amp; am using below code to download a csv file from GCS bucket to local folder.</p>
  
  <p>// function to download file from GCS bucket</p>
  
  <pre><code>async function downloadFile(bucketName, srcFilename, destFilename) {
  
      // Imports the Google Cloud client library
      const {Storage} = require('@google-cloud/storage');
  
      // Creates a client from a Google service account key.
      const storage = new Storage({keyFilename: "keyFile.json"});
  
      /**
       * TODO(developer): Uncomment the following lines before running the sample.
       */
      // const bucketName = 'Name of a bucket, e.g. my-bucket';
      // const srcFilename = 'Remote file to download, e.g. file.txt';
      // const destFilename = 'Local destination for file, e.g. ./local/path/to/file.txt';
  
      const options = {
        // The path to which the file should be downloaded, e.g. "./file.txt"
        destination: destFilename,
      };
  
      // Downloads the file
      await storage
        .bucket(bucketName)
        .file(srcFilename)
        .download(options);
  
      console.log(
        `gs://${bucketName}/${srcFilename} downloaded to ${destFilename}.`
      );
      // [END storage_download_file]
    }
  
    // call downloadFile function
    downloadFile('temp_bucket123','test_data.csv','./gcs_download/test_data.csv')
  </code></pre>
  
  <p>This code gives below error:</p>
  
  <blockquote>
    <p>(node:10708) UnhandledPromiseRejectionWarning: Unhandled promise
    rejection. This error originated either by throwing inside of an async
    function without a catch block, or by rejecting a promise which was
    not handled with .catch(). (rejection id: 1) (node:10708) [DEP0018]
    DeprecationWarning: Unhandled promise rejections are deprecated. In
    the future, promise rejections that are not handled will terminate the
    Node.js process with a non-zero exit code.</p>
  </blockquote>
  
  <p>Do i need to re-write the function in a different way?</p>