HACK env as a function, so it can be different per worker
Improve debug output, to clarify worker life-cycle