If the debtor in value owns real property in town which exceeds the sum of $500.00 and it cannot be so divided as to give that amount to his family, he may give notice to the officer levying thereon. When the proceeds of the sale are distributed, the court shall order $500.00 of the same to be invested by some proper person in a home for the family of the debtor, which home shall be exempt as if laid off under this article.