Added more error-handling on NPM registry failure