Added function isEOF.