Add missing import of pika.
Add debugging output for uuid generation.