Yeah the pants will be safe, and what kind of wood? that flatworm would have did eventually if it was going to be set up with no fish (so there would be no food) but everything should be fine. Remember to soak the wood in hot water before you put it in