Improve reliability of BUILD.CMD.