Preventing medical devices from being hacked