debug line should mention the right function, not allocate_ip (this is valid for all debug lines here, I guess)