Return error if read fails