The folder sits in a guard that removes it on drop, so a panic in the write or the search no longer leaves the 41 MiB file in the temporary directory. The normal path still removes it explicitly and fails on an error.