Added error check to newvm.sh