addressing different failure behaviour between versions of nodejs