always use perror for errors