Added renderFile function