code: function writeProfile() {
          var format;
          if (/\.cpuprofile$/.test(argv.o)) {
              format = 'cpuprofile';
          }
  
          var prof = stopCPU('global', format);
  		fs.writeFileSync(argv.o, prof);
  		var fname = JSON.stringify(argv.o);
  		console.warn('Profile written to', fname + '\nTry `kcachegrind', fname + '`');
          process.removeAllListeners('exit');
          process.exit(0);
  	}
docs: Stop profiling in an exit handler so that we properly handle async code