You should likely consult an accountant and/or an attorney as we don’t give legal counsel. However, it’s my understanding that if you received a loan as a sole proprietor, then that loan is attached to you personally. So if you later incorporate as an LLC or other business entity then you’ll still personally be attached to the loan. If you took out the loan in the business’s name and the security agreement acknowledges that they have a right to business assets if you default, then it should go on the company books. It’s a business loan that your personal assets are being used to secure it.
Good luck and let us know if you have more questions!