exitting on EOF