DOPS-42 error checking around link creation to prevent dpkg failure