cleanup before build