Fix #2821 file validator

Fix #2821 file validator