fixed logging of control chars