Replaced legacy sprintf with boost::format.