Only unlink when needed