BUG: change temp_fname to have the process id