Added detection of existing symlink and removes it before reinstalling