using temp file & parallel computing

using temp file to avoid file operation with multiply processors