stricter log file name check.