fixed build script to pause when completed