If the target file does not exist, the mode should be 5 (4 + 1)?
Open(3, $logfile1, 5 )