diff --git a/modules/prefill/prefill.lua b/modules/prefill/prefill.lua
index 19d89ecc558a0c6893e29109a0f43c53702fb46a..f74d711b0f492c2a6d2786855ba2f73f2786618b 100644
--- a/modules/prefill/prefill.lua
+++ b/modules/prefill/prefill.lua
@@ -42,15 +42,12 @@ end
 
 -- Write root zone to a file.
 local function rzone_write(rzone)
-	local tmp_rz_fname = os.tmpname()
-	local file = assert(io.open(tmp_rz_fname, 'w'))
+	local file = assert(io.open(rz_local_fname, 'w'))
 	for i = 1, #rzone do
 		local rzone_chunk = rzone[i]
 		file:write(rzone_chunk)
 	end
 	file:close()
-	os.rename(tmp_rz_fname, rz_local_fname)
-	-- TODO: IO error handling
 end
 
 local function display_delay(time)