End file error fix