Whenever the commissioner has taken possession of any licensee, such licensee, within 10 days after such taking, if it deems it is aggrieved thereby, may apply to the superior court in the county in which the head office of the licensee is located to enjoin further proceedings. The court, after citing the commissioner to show cause why further proceedings should not be enjoined and after a hearing and a determination of the facts upon the merits may dismiss such application or enjoin the commissioner from further proceeding and direct him to surrender the property and business to the licensee, or make such further order as may be just.