Better naming and add some documentation
was overkill to use a coroutine.

Make sure tempfiles are cleaned up.