slight clean task update to handle errors better