init base dir