adding exist check before islink and unlink