read add error handling