If the testimony produced on the hearing before the judge or upon such trial before the judge or court shall fail to establish the complaint or that a ground existed for the issuance of the warrant or that the liquors and beverages and vessels and receptacles were kept, stored or deposited for the purpose of unlawful sale, distribution or delivery within this state, judgment shall be entered dismissing such complaint and providing that such liquors and beverages and the vessels and receptacles containing the same be returned to the place from which or to the person from whom they were taken.