(a)at any such port having an Indian consular officer, the master shall, before carrying the seaman to sea, procure the sanction of the consular officer, and shall, if not contrary to any law in force in that port, engage the seaman before that officer;