restore "writeHead" function from local file.