Adding output buffering automatically