Add control on mkdir db and cache directory