removed the basename from the joinpath in line 91