support custom opts in renderFile