prevent empty log file, moved checkFileExist()