make eof exception customizable