check for existence of path before delete