Add safety against broken symlinks