file: close the `fd` upon an error before creating the ReadStream