Manage temporary files properly.