edu.handong.csee.isel.data.processor.CSVPrinter did not close its printer and buffered reader. So the contents from the last buffer were not written. If writer of BufferedWriter and printer of CSVPrinter are closed, the problem could be fixed.