Add a cleanup step at the end of core build