added check for existing symlinks