Bug description:
When an active service changes state (e.g., running → stopped, restarted, or crashes), related .tmp files are not deleted.
Temporary files remain on disk even though the service instance that created them is no longer active.
Expected behavior:
- When a service transitions from draft state to active no temporary files should remain
- No orphaned temporary files remain after state transition.
- Cleanup should not affect unrelated or shared files.