IO Excpetion on EOF