fix check dirs is writeable
add some documentation