report generation/GridFS fixes