more fail checking and formatting in build script