added check for presence of data folder