p2ptrade: fixes and proper debug output