Added config-driven buffer profiling stats (fixed errors/warnings)