Shouldn't we be using `temp_file.path` here instead?