catch EOF error also

Change-Id: I57a5d0a575151bddfe7fbb969f29156e6f10e74b