cleanup before building