Fix bug when rootDir property was not defined