Improve reliability of Build.bat