If the listener is given a path where no file exists, it creates the csv and writes in it, and if the csv already exists and contains data, it works, but if the csv input does not have any data, the listener will crash as it tries to read the columns.