update command has been added and more try catch have been added