switch over to string for mode_info
use ostringstream instead of printf variant for type safety also add constness where appropriate to support