added file.serialize state
fixed jinja template helper