csv files management, bug fixed