add support for data and mainDir