remove debug info and revert const char buf