Use output buffers to prevent pre-mature headers