Include process ID in temporary file names to avoid collisions