Changed the fopen mode to convert toCsv that was not creating new files when they didnt exists