Simplify `renderFile` logic a bit.

Plus a drive-by fix for my comment on 34cc63ae48