Added perror to read error