use strerror to generate error