Added error-handling for npm