Maybe a way to pass an error code (so this can be a substitution for perror