file_check() should be complete now...
I didn't do as much as GH diff says,

I really just fixed the indention level and made the code actually work.
And that should be the illegal file check! :D

Now, I haven't tested this yet, but should work with no issues. We'll
find out very soon. ;)