modified cleanup option