Error on Lock() when part of path has already been created