try harder to track build state, catching also interrupted builds