Handling CMD window errors in the computer