Added base dir param to kernel