Prepare report generation into separate file