One way to make sure the code is in your possession is to make certain you have administrative access to your code at all times. You can also start a GitHub, GitLab, or a similar account, place your code on that service, and update it as the code is updated and revised.