Implements cleanup failsafe