Fix error when path contans spaces