added tail regex check for log file