mv dataDir to read() and out of constructor