add remove tmp dir on build error