[Finishes #61626278] add descriptor handling around files.