add render_file function

Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>