Need to remove this fixed `tmp_file` name from the code. It should generate an unused file name as needed.