Added a batch to dump csv, modified DB connection