add auto-mkpath feature