Added sample code for EOF.