update error file ending with head