I think that you need for the JOIN instead the WRITE and no "sd\" in path!