save the header and data into two separate files, allowing us to serve the data via X-Accel-Redirect
add stats