There are several instances of improper usage of tempfile.TemporaryDirectory() in sctools and that is likely to be the cause of improper cleanup. @mbabadi Can you point to an instance of this?