Adding 'ensure' to 'cleaning' method

Adding 'ensure' to 'cleaning' method for better error tolerance