exposed config and configdir as parameters