if (-e $tempFile) { open(TEMPFILE,"+<$tempFile") || die("failed to open $tempFile");