check file ending during normalzation
first lookup implementation
fix cursor in exported template