fixed strip-and-split to output into current directory