refresh state between input files (don't want to keep stale templates)