finalize
fix directory creation