Error handling process.exit()