Make path operations safe