modifying bad file descriptor