Fix the required file checker

Thanks @RainoBoy97