Fix temporary directories not being removed
Fix output stream status not updating