Section 5. With the consent of the governor and council, the department may take by eminent domain under chapter seventy-nine or acquire by purchase or otherwise, and hold, such real property and such rights and easements therein as the department may from time to time consider necessary for the purpose of constructing, or securing the constructing or utilizing of, piers and, in connection therewith, highways, waterways, railroad connections, storage yards and sites for warehouses and industrial establishments, and may lay out and build thereon, and upon such other lands within its jurisdiction under section three, such piers, with buildings and appurtenances, docks, highways, waterways, railroad connections, storage yards and public warehouses as the department deems desirable; provided, that if general plans bearing the signed approval of the department, given after due notice and a hearing, describing the property and showing the location and character of any proposed docks, piers, wharves, warehouses, factories, power plants, and industrial terminals, of adequate and proper design and general suitability for the purposes for which they are to be used, shall be filed with the department, together with a notice signed by the owners or lessees or by others having legal rights in the premises stating that they propose to construct upon the property described the improvements shown by said plans and claiming exemption from the taking by eminent domain as herein authorized of any of such property, including the lands upon which said improvements are to be constructed, then said land and said improvements shall not be taken by the department by right of eminent domain without authorization of the general court granted within forty years after the date of filing of said plans, if substantial construction in general accordance with such plans is actually begun in good faith within one year after the date of approval by the department of the plans, and if said improvements are finished substantially in accordance therewith within five years after the beginning of construction of said improvements unless the department shall extend the time within which said improvements shall be completed; and provided, that after completion, said improvements during said period of forty years are kept in suitable repair and are used for the purposes to which said approval applied, and provided, that if general plans bearing the signed approval of the department, given after due notice and a hearing, and describing the property, and the location and character of any existing docks, piers, wharves, warehouses, factories, power plants, and industrial terminals, and certifying that they are of proper design and adequate and suitable for the purposes for which they are to be used, and that they are in proper condition and in thorough repair, shall be filed with the department, together with a notice signed by the owners or lessees, or others having legal rights in the premises and claiming exemption from the taking by eminent domain as authorized by this section of any such property, including the lands upon which said improvements have been constructed, then said land and said improvements shall not be taken by the department by the right of eminent domain without authorization of the general court granted within forty years after the date of the approval by the department, if during that time such property is kept in suitable repair and is used for the purposes to which said approval applied; and provided, that none of the exemptions from the right of eminent domain herein provided for shall apply to the taking by the department of any property necessary for providing suitable and convenient track connections between the rails serving any piers that may be built, or acquired or improved under sections four and five or may have been built or acquired or improved under corresponding provisions of earlier laws, and the rails of any existing or proposed railroad that reaches or may reach Boston.