raise bad file descriptor and return