While any such excavation remains open, and during the placing of any foundation within it, such excavation shall be maintained in a safe condition by the owner or person carrying out such excavation.