I actually liked that part of the script. That was what the fireworks were intended for all along: to muffle her sound so she could give birth and then move the baby to the basket, where it would live inside a box until it could control its noises; so say... 6 years. When the fireworks went off I thought, "oh, so they have thought about it. OK then." But when they followed it up with Moses I thought, "oh for f-cks sake..."
This was another example of characters who were very smart in some ways and hopelessly stupid in other ways.
Since we're in spoiler mode, I missed something: how did the bug get down there anyway? Through the water pipe? Because if the aperture was wide enough that's more awful planning. But what can you expect from Jim? Irony won't save you now, as-shole.