cleaning after success or filure