catch exception when deleting parent directory
new version for npm