use npm update instead of npm install and some if statement validations