Changed some snprintf calls to boost::format, avoids some compiler warnings.