Adding a lot of debugging statements and a few sleeps

pkg seems to fail with installation. Seems like a network/dns issue but
it's hard to diagnose.