adapted call for theme dir and locale dir