serialize rep data
don't use tmp_file_path anymore