Merged in the renderFile stuff from 059dcc936e55d8473a3a683162a7d6e5ce3af3f8. Tests passing