Section 52. If it is not proved on the trial that all or part of the beverages seized was kept or deposited for sale contrary to law, the court shall issue a written order to the officer having the same in custody to return so much thereof as was not proved to be so kept or deposited and the vessels in which it is contained, to the place as nearly as may be from which it was taken, or to deliver it to the person entitled to receive it. After executing such order, the officer shall return it to the court with his doings endorsed thereon.