optimize build for leftover files in each step