Where any foreign ship is detained under this Act, and where any proceedings are taken under this Act against the master or owner of any such ship, notice shall forthwith be served on the Consular officer for the country to which the ship belongs at or nearest to the port where the ship is for the time being, and such notice shall specify the grounds on which the ship has been detained or the proceedings have been taken.