Implemented ShouldRenderFile

Please review.

If you are happy with these changes then I am and you can merge.