Utilise the built-in temporary file manager class.