added logic to export file with some parameters