updated engine to change template dir