Added -DSERIAL_DEBUG flag