Better output buffering for Lua pages