Merge pull request #9801 from eleuzi01/issue-72-backport

[Backport 3.6] Move check_files.py to the framework