added support for layoutsDir config option