Add file ending checker