bug with dir_fd fixed by another way