minor refactoring of FileValidator.