Fixed agg output csv files instead of database.