add better default directory and fix directories automatically