There should be specs for testing what given file requires. The specs should parse given file which should have a header specifying which files it requires (so it can works as a documentation and as a spec) and spec will ensure it match with actually loaded files.