set workdir at the top,
add public/cache to write list