check file ending during normalzation