More roboust build script