needed to strdup the pathname