When you need to hammer a nail near the ledge of the wooden parts, then there is always the danger of damaging it. However, this will not happen if you use any metal or plastic strip installed between the nail and the ledge, it will send the hammer and protects the edge of the part.
Recommend to read
SUN PROTECTION
If the solar rays fall on the thermometer, mounted outside window frame, it heats up and shows... its temperature, not the ambient air. To avoid this, protect the thermometer shade...
A ROPE AND A STICK
Legendary Nasreddin duped the Emir, saying that the most effective torture clenching of the head using a rope loop and a stick. And this technique is really effective... when gluing wood...