fixed render_file so errors in rendered_files result in correct debugging output