data generator from file reader + chech errors in writing data generators to file