Lighthouses have prevented ships from running aground for hundreds of years