fix issue with path contains ~